export function crashTest(obj1:HTMLElement,obj2:HTMLElement) {
  var leftSide = obj1.offsetLeft - obj2.offsetWidth/2;
  var rightSide = obj1.offsetLeft + obj1.offsetWidth + obj2.offsetWidth / 2;

  var midX = obj2.offsetWidth/2 + obj2.offsetLeft;

  var topSide = obj1.offsetTop - obj2.offsetHeight / 2;
  var bottomSide = obj1.offsetTop + obj1.offsetHeight + obj2.offsetHeight / 2;

  var midY = obj2.offsetHeight/2 + obj2.offsetTop;

  if(leftSide < midX && rightSide > midX && topSide < midY && bottomSide > midY) {
    return true;
  }else {
    return false;
  }
}